package com.visceb.backstage.dao;
import com.visceb.backstage.entity.tcplog;
import com.visceb.backstage.entity.weblog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface tcpRepository extends JpaRepository<tcplog, Long>{
    List<tcplog> findAllByUplinklength(int uplinklength);
    List<tcplog> findAllByDownlinklength(int downlinklength);
    @Query(nativeQuery = true,value =
//            "select * from tcplog where uplink_length >= ?1")
//    List<tcplog> finderror(int uplinklength);
            "select * from tcplog where uplink_length >= 200000000 and id<200")
    List<tcplog> finderror();
    @Query(nativeQuery = true,value =
            "select * from tcplog where (downlink_length >= 200000000) and id<200")
    List<tcplog> finderror1();
}
